package com.wnxy;

import java.util.ArrayList;
import java.util.List;

/**
* 堆内存溢出演示
* VM Args: -Xms20m -Xmx20m -XX:NewRatio=1 -XX:SurvivorRatio=1
**/
public class App3 {

    public static void main(String[] args) throws Exception {
        List<byte[]> list = new ArrayList<byte[]>();
        while (true){
            Thread.sleep(5);
        	list.add(new byte[1024]);
        }
    }
}